﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IRCPhase2Tester.Tests;

namespace IRCPhase2Tester
{
    public class Session
    {
        private Session()
        {
            PassedTests = new List<ITest>();
            FailedTests = new List<ITest>();
        }

        private static Session instance;

        public static Session Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new Session();
                    instance.AllConfigurationFiles = new Dictionary<int, string>();
                    string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\";
                    instance.AllConfigurationFiles.Add(1, appPath + "Node1.config");
                    instance.AllConfigurationFiles.Add(2, appPath + "Node2.config");
                    instance.AllConfigurationFiles.Add(3, appPath + "Node3.config");
                    instance.AllConfigurationFiles.Add(4, appPath + "Node4.config");
                    instance.AllConfigurationFiles.Add(5, appPath + "Node5.config");
                    instance.AllConfigurationFiles.Add(6, appPath + "Node2-1.config");
                }
                return instance;
            }
        }

        public string RoutingDaemonPath { get; set; }

        public List<ITest> PassedTests { get; set; }

        public List<ITest> FailedTests { get; set; }

        public string SecretKey { get; set; }

        public Dictionary<int, string> AllConfigurationFiles { get; set; }
    }
}
